import 'package:flutter_aggregate/model/common/common_page.dart';
import 'package:flutter_aggregate/model/onlineOrder/screens/details/online_detail_screen.dart';
import 'package:flutter_aggregate/model/onlineOrder/screens/home/online_home_screen.dart';
import 'package:flutter_aggregate/model/plant/screens/details/detail_screen.dart';
import 'package:flutter_aggregate/model/plant/screens/home/home_screen.dart';
import 'package:flutter_aggregate/router/app_routers.dart';
import 'package:get/get.dart';

class AppPages {
  static final List<GetPage<dynamic>> routers = [
    GetPage(
      name: '/', 
      page: () => const CommonPage(),
      transition: Transition.circularReveal,
      children: [
        /// 种植
        GetPage(
          name: AppRouters.plantHome, 
          page: () => const HomeScreen(),
          transition: Transition.rightToLeft,
          children: [
            GetPage(
              name: AppRouters.plantDetail, 
              page: () => const DetailScreen(),
              transition: Transition.rightToLeft
            ),
          ]
        ),
        /// 在线点餐
        GetPage(
          name: AppRouters.onlineHome, 
          page: () => const OnlineHomeScreen(),
          transition: Transition.rightToLeft,
          children: [
            GetPage(
              name: AppRouters.onlineDetail, 
              page: () => const OnlineDetailScreen(),
              transition: Transition.rightToLeft,
            ),
          ]
        )
      ]
    )
  ];
}